package com.onesports.intelligent.k12.polarlight.enums;

import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import com.onesports.framework.kit.common.util.ParamUtils;

/**
 * 审核状态枚举类
 * @author wusy
 **/
public enum AuditStatusEnum implements IEnum<String> {
    /**
     * 审核状态枚举类
     */
    WAIT("1","待审核"),
    PASS("2","审核通过"),
    NO_PASS("3","审核不通过"),;
    private final String type;
    private final String desc;


    AuditStatusEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    @Override
    public String getValue() {
        return this.type;
    }

    @JsonValue
    public String getDesc() {
        return this.desc;
    }

    public AuditStatusEnum of() {
        return this;
    }

    public static AuditStatusEnum of(String desc) {
        for (AuditStatusEnum gender : AuditStatusEnum.values()) {
            if (ParamUtils.equals(gender.desc, desc)) {
                return gender;
            }
        }
        return null;
    }
}
